package com.clsfd.database;

import java.sql.SQLException;

public class ClassifiedItem {

	
	private int ItemID=0;
	private int ParentID=0;
	private String Name ="";
	private String Prompt="";
	private int Rank=0;
	private DatabaseConnection DatabaseCon=null;
	
	public ClassifiedItem(DatabaseConnection databaseCon,int itemID, int parentID, String name, String prompt,int rank) {
		super();
		ItemID = itemID;
		ParentID = parentID;
		Name = name;
		Prompt = prompt;
		Rank = rank;
		DatabaseCon=databaseCon;
	}
	
	
	private int getRank() {
		return Rank;
	}
	private void setRank(int rank) throws SQLException {
		Rank = rank;
		DatabaseCon.sqlUpdate("update `classifcation` set `rank`="+rank+" where `itemid`="+ItemID);
	}
	private int getItemID() {
		return ItemID;
	}
	private int getParentID() {
		return ParentID;
	}
	private String getName() {
		return Name;
	}
	private String getPrompt() {
		return Prompt;
	}
}
